<template>
  <div class="cart-header">
    <h2>购物车</h2>
    <span>{{ cartStore.cartItems.length }} 件商品</span>
  </div>
</template>

<script setup>
import { useCartStore } from '../stores/cart'

const cartStore = useCartStore()
</script>

<style lang="less" scoped>
.cart-header {
  height: 50px;
  line-height: 50px;
  font-size: 16px;
  background-color: #42b983;
  text-align: center;
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}
</style>
